package com.sugar.reflection;

import java.lang.reflect.Method;

/**
 * @author felix
 * @date 2025/2/10 15:12
 */
public class ReflectDemo5 {
    public static void main(String[] args) throws ClassNotFoundException, NoSuchFieldException {
        Class<?> clazz = Class.forName("com.sugar.reflection.Student");
        Method[] methods = clazz.getMethods();
        for(Method method :  methods)
            System.out.println(method);
        System.out.println("************");
        Method[] declaredMethods = clazz.getDeclaredMethods();
        for(Method method :  declaredMethods)
            System.out.println(method);
    }
}
